package com.dime.physical.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dime.physical.mapper.DimeMaincheckharmadviceMapper;
import com.dime.physical.domain.DimeMaincheckharmadvice;
import com.dime.physical.service.IDimeMaincheckharmadviceService;

/**
 * 危害结论对应建议Service业务层处理
 * 
 * @author Tiny
 * @date 2023-10-17
 */
@Service
public class DimeMaincheckharmadviceServiceImpl implements IDimeMaincheckharmadviceService 
{
    @Autowired
    private DimeMaincheckharmadviceMapper dimeMaincheckharmadviceMapper;

    /**
     * 查询危害结论对应建议
     * 
     * @param id 危害结论对应建议主键
     * @return 危害结论对应建议
     */
    @Override
    public DimeMaincheckharmadvice selectDimeMaincheckharmadviceById(String id)
    {
        return dimeMaincheckharmadviceMapper.selectDimeMaincheckharmadviceById(id);
    }

    /**
     * 查询危害结论对应建议列表
     * 
     * @param dimeMaincheckharmadvice 危害结论对应建议
     * @return 危害结论对应建议
     */
    @Override
    public List<DimeMaincheckharmadvice> selectDimeMaincheckharmadviceList(DimeMaincheckharmadvice dimeMaincheckharmadvice)
    {
        return dimeMaincheckharmadviceMapper.selectDimeMaincheckharmadviceList(dimeMaincheckharmadvice);
    }

    /**
     * 新增危害结论对应建议
     * 
     * @param dimeMaincheckharmadvice 危害结论对应建议
     * @return 结果
     */
    @Override
    public int insertDimeMaincheckharmadvice(DimeMaincheckharmadvice dimeMaincheckharmadvice)
    {
        dimeMaincheckharmadvice.setCreateTime(DateUtils.getNowDate());
        return dimeMaincheckharmadviceMapper.insertDimeMaincheckharmadvice(dimeMaincheckharmadvice);
    }

    /**
     * 修改危害结论对应建议
     * 
     * @param dimeMaincheckharmadvice 危害结论对应建议
     * @return 结果
     */
    @Override
    public int updateDimeMaincheckharmadvice(DimeMaincheckharmadvice dimeMaincheckharmadvice)
    {
        dimeMaincheckharmadvice.setUpdateTime(DateUtils.getNowDate());
        return dimeMaincheckharmadviceMapper.updateDimeMaincheckharmadvice(dimeMaincheckharmadvice);
    }

    /**
     * 批量删除危害结论对应建议
     * 
     * @param ids 需要删除的危害结论对应建议主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmadviceByIds(String[] ids)
    {
        return dimeMaincheckharmadviceMapper.deleteDimeMaincheckharmadviceByIds(ids);
    }

    /**
     * 删除危害结论对应建议信息
     * 
     * @param id 危害结论对应建议主键
     * @return 结果
     */
    @Override
    public int deleteDimeMaincheckharmadviceById(String id)
    {
        return dimeMaincheckharmadviceMapper.deleteDimeMaincheckharmadviceById(id);
    }
}
